python get dpi of image

30

from PIL import Image
im = Image.open("path/to/image")
im.info['dpi']

Comments

Submit
0 Comments